export class CommonUtil {
    /**
     * 获取客户端IP
     * @param {Request} req
     * @returns {string}
     */
    public static getClientIp(req): string {
        return req.headers['x-forwarded-for'] ||
            req.connection.remoteAddress ||
            req.socket.remoteAddress ||
            req.connection.socket.remoteAddress || '';
    }
}